﻿using System;
using System.Collections.Generic;
using NDK.Motion.MachineManager;

namespace NDK.Motion.MachineResources
{
    [Serializable]
    public class Station
    {
        private string _stationName;
        public List<Axis> AxisList = new List<Axis>();

        /// <summary>
        /// 工站名称
        /// </summary>
        public string StationName
        {
            get
            {
                return _stationName;
            }

            set
            {
                _stationName = value;
            }
        }
        /// <summary>
        /// 从属轴名称集合
        /// </summary>
        public string Axes
        {
            get
            {
                if (AxisList.Count == 0) return "";
                if (AxisList.Count == 1) return AxisList[0].Name;
                string axisNames = "";
                foreach (var axis in AxisList)
                {
                    axisNames = string.IsNullOrWhiteSpace(axisNames) ? axis.Name : axisNames +","+ axis.Name;
                }
                return axisNames;
            }
        }
    }
}
